import type { postOrPutType } from "@/constants";
import type { IList, IResult } from "@/types/common";
import { getAxios, commonAxiosJson, deleteAxios } from "@/utils/request.js";
/* 回收商品,回收报价 地址 */
const url = "/back/recycle-quotation";
/* 回收商品数据：获取 回收报价 */
export const getRecycleQuotationInfo = <T, D>(params?: D): Promise<IResult<IList<T>>> => {
  return getAxios<IList<T>, D>(url, params);
};
/* 回收分类数据：新增，修改回收报价信息 */
export const commonRecycleQuotationInfo = <T, D>(params: D, type: postOrPutType): Promise<IResult<T>> => {
  return commonAxiosJson<T, D>(url, params, type);
};
/* 回收分类数据：删除 回收报价信息 */
export const deleteRecycleQuotationInfo = <T, D>(params: D): Promise<IResult<T>> => {
  return deleteAxios<T, D>(url, params);
};
